import Vue from 'vue';
import Router from 'vue-router';
const loginPage = resolve => require(['@/page/common/login-page'], resolve)
const rechargePassword = resolve => require(['@/page/common/recharge-password'], resolve)

//客户端管理
//用户管理
const userUserList = resolve => require(['@/page/user/userList'], resolve)
const userUserDetail = resolve => require(['@/page/user/userDetail'], resolve)
//内容管理

const goodList = resolve => require(['@/page/goodManage/goodList'], resolve)
const goodCheck = resolve => require(['@/page/goodManage/goodCheck'], resolve)
const goodEdit = resolve => require(['@/page/goodManage/goodEdit'], resolve)
const sortList = resolve => require(['@/page/goodManage/sortList'], resolve)
const firstSortList = resolve => require(['@/page/goodManage/firstSortList'], resolve)
const secondSortList = resolve => require(['@/page/goodManage/secondSortList'], resolve)
const freight = resolve => require(['@/page/goodManage/freight'], resolve)
const sortEdit = resolve => require(['@/page/goodManage/sortEdit'], resolve)
const bannerList = resolve => require(['@/page/goodManage/bannerList'], resolve)
const bannerEdit = resolve => require(['@/page/goodManage/bannerEdit'], resolve)
const contentAd = resolve => require(['@/page/content/contentAd'], resolve)
const aboutUs = resolve => require(['@/page/content/aboutUs'], resolve)
const registerText = resolve => require(['@/page/content/registerText'], resolve)
const introduce = resolve => require(['@/page/content/introduce'], resolve)
const home = resolve => require(['@/page/content/home'], resolve)
const managerList = resolve => require(['@/page/content/managerList'], resolve)

const roleList = resolve => require(['@/page/systemManage/roleList'], resolve)
const roleEdit = resolve => require(['@/page/systemManage/roleEdit'], resolve)
const accountList = resolve => require(['@/page/systemManage/accountList'], resolve)
const accountEdit = resolve => require(['@/page/systemManage/accountEdit'], resolve)

//订单管理
const orderList = resolve => require(['@/page/orderManage/orderList'], resolve)
const orderDetail = resolve => require(['@/page/orderManage/orderDetail'], resolve)
const logisticsDetail = resolve => require(['@/page/orderManage/logisticsDetail'], resolve)
const rmbOrderList = resolve => require(['@/page/orderManage/rmbOrderList'], resolve)
const rmbOrderDetail = resolve => require(['@/page/orderManage/rmbOrderDetail'], resolve)
const orderAfter = resolve => require(['@/page/orderManage/orderAfter'], resolve)
const orderAfterDetail = resolve => require(['@/page/orderManage/orderAfterDetail'], resolve)
const goodOrderList = resolve => require(['@/page/orderManage/goodOrderList'], resolve)
const goodOrderDetail = resolve => require(['@/page/orderManage/goodOrderDetail'], resolve)

Vue.use(Router)
export default new Router({
  mode: 'history',
  base: '/sys/',
  routes: [
    {
      path: '/loginPage',
      name: 'loginPage',
      component: loginPage
    },
    {
      path: '/',
      name: 'home',
      component: home
    },
    {
      path: '/rechargePassword',
      name: 'rechargePassword',
      component: rechargePassword
    },
    {
      path: '/userList',
      name: 'userUserList',
      component: userUserList
    },
    {
      path: '/userDetail',
      name: 'userUserDetail',
      component: userUserDetail
    },
    {
      path: '/roleList',
      name: 'roleList',
      component: roleList
    },
    {
      path: '/roleEdit',
      name: 'roleEdit',
      component: roleEdit
    },
    {
      path: '/accountList',
      name: 'accountList',
      component: accountList
    },
    {
      path: '/accountEdit',
      name: 'accountEdit',
      component: accountEdit
    },
    {
      path: '/goodList',
      name: 'goodList',
      component: goodList
    },
    {
      path: '/sortList',
      name: 'sortList',
      component: sortList
    },
    {
      path: '/freight',
      name: 'freight',
      component: freight
    },
    {
      path: '/sortEdit',
      name: 'sortEdit',
      component: sortEdit
    },
    {
      path: '/orderList',
      name: 'orderList',
      component: orderList
    },
    {
      path: '/orderDetail',
      name: 'orderDetail',
      component: orderDetail
    },
    {
      path: '/logisticsDetail',
      name: 'logisticsDetail',
      component: logisticsDetail
    },
    {
      path: '/goodEdit',
      name: 'goodEdit',
      component: goodEdit
    },
    {
      path: '/bannerList',
      name: 'bannerList',
      component: bannerList
    },
    {
      path: '/bannerEdit',
      name: 'bannerEdit',
      component: bannerEdit
    },
    {
      path: '/contentAd',
      name: 'contentAd',
      component: contentAd
    },
    {
      path: '/aboutUs',
      name: 'aboutUs',
      component: aboutUs
    },
    {
      path: '/registerText',
      name: 'registerText',
      component: registerText
    },
    {
      path: '/introduce',
      name: 'introduce',
      component: introduce
    },
    {
      path: '/secondSortList',
      name: 'secondSortList',
      component: secondSortList
    },
    {
      path: '/firstSortList',
      name: 'firstSortList',
      component: firstSortList
    },
    {
      path: '/rmbOrderList',
      name: 'rmbOrderList',
      component: rmbOrderList
    },
    {
      path: '/rmbOrderDetail',
      name: 'rmbOrderDetail',
      component: rmbOrderDetail
    },
    {
      path: '/orderAfter',
      name: 'orderAfter',
      component: orderAfter
    },
    {
      path: '/orderAfterDetail',
      name: 'orderAfterDetail',
      component: orderAfterDetail
    },
    {
      path: '/goodCheck',
      name: 'goodCheck',
      component: goodCheck
    },
    {
      path: '/managerList',
      name: 'managerList',
      component: managerList
    },
    {
      path: '/goodOrderList',
      name: 'goodOrderList',
      component: goodOrderList
    },
    {
      path: '/goodOrderDetail',
      name: 'goodOrderDetail',
      component: goodOrderDetail
    },
  ]
})